<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!doctype html>
<html lang="zh-CN">
<head>
<base href="<%=basePath%>">
<meta charset="UTF-8">
<link rel="stylesheet" href="css/common.css">
<link rel="stylesheet" href="css/main.css">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/colResizable-1.3.min.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="js/dataChart.js"></script>
<script type="text/javascript">
      $(function(){  
        $(".list_table").colResizable({
          liveDrag:true,
          gripInnerHtml:"<div class='grip'></div>", 
          draggingClass:"dragging", 
          minWidth:30
        }); 
        
      }); 
   </script>
<title>Document</title>
</head>
<body>
	<div id="search_bar" class="mt10">
		<div class="box">
			<div class="box_border">
				<div class="box_top">
					<b class="pl15">请假信息</b>
				</div>
				<div class="box_center pt10 pb10"></div>
				<div class="box_bottom pb5 pt5 pr10"
					style="border-top:1px solid #dadada;">
					<form
						action="<%=path %>/admin/vacate_queryList.action?pageList.pageNo=1">


						<div class="search_bar_btn" style="text-align: center;">
						
							<p>
								<select id="select" class="select">
									<option value="">--选择--</option>
									<option value="pageList.stuName">按姓名查找</option>
									<option value="pageList.gradeClass">按班级查找</option>
								</select> &nbsp; <input type="text" id="selectInput"
									class="input-text lh25" size="10">&nbsp; <input
									type="submit" class="ext_btn ext_btn_success" value="查找">&nbsp;
							</p>
							<p>
							</p>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
	<div id="table" class="mt10">
		<div class="box span10 oh">
			<table width="100%" border="0" cellpadding="0" cellspacing="0"
				class="list_table">
				<tr>
					<th width="30">编号</th>
					<th width="100">学院</th>
					<th width="100">班别</th>
					<th width="100">姓名</th>
					<th width="100">请假事由</th>
					<th width="100">请假类型</th>
					<th width="100">请假天数</th>
					<th width="100">证明材料</th>
					<th width="100">前往地点</th>
					<th width="60">辅导员审批</th>
					<th width="60">校领导审批</th>
					<th width="60">学工处审批</th>
					<th width="100">请假时间</th>
					<th width="100">操作</th>
				</tr>
				<s:iterator value="pageList.dataList" id="list">
					<tr class="tr">
						<td><s:property value="#list.id" /></td>
						<td><s:property value="#list.academy" /></td>
						<td><s:property value="#list.gradeClass" /></td>
						<td><s:property value="#list.stuName" /></td>
						<td><s:property value="#list.reason" /></td>
						<td>
						<s:if test="#list.reasonType==0">事假</s:if>
						<s:if test="#list.reasonType==1"> 病假</s:if>
						<s:if test="#list.reasonType==2"> 休学</s:if>
						</td>
						<td>
						<s:if test="#list.day==0">七天以下</s:if>
						<s:if test="#list.day==1">七天以上（包括七天）</s:if>
						</td>
						<td>
						  <a href="<%=path %>/admin/download.action?filePath=file&fileName=<s:property value="#list.filePath"/>"  target="right"  class="button border-main icon-search" onclick="changesearch()" ><s:property value="#list.filePath" /></a>
						</td>
						<td><s:property value="#list.site" /></td>
						<td>
						
						<s:if test="#list.checkTeacherState==0"><label style="color: blue;font-size: 12px;font-weight: bolder;">◎审核中</label></s:if>
						<s:if test="#list.checkTeacherState==1"><label style="color: green;font-size: 12px;font-weight: bolder;">√审核通过</label></s:if>
						<s:if test="#list.checkTeacherState==2"><label style="color:red ;font-size: 12px;font-weight: bolder;">×审核失败</label></s:if>
						
						</td>
						<td>
						
						<s:if test="#list.checkLeaderState==0"><label style="color: blue;font-size: 12px;font-weight: bolder;">◎审核中</label></s:if>
						<s:if test="#list.checkLeaderState==1"><label style="color: green;font-size: 12px;font-weight: bolder;">√审核通过</label></s:if>
						<s:if test="#list.checkLeaderState==2"><label style="color:red ;font-size: 12px;font-weight: bolder;">×审核失败</label></s:if>
					
						</td>
						<td>
						<s:if test="#list.day==1">
						<s:if test="#list.checkStuWorkState==0"><label style="color:blue; ;font-size: 12px;font-weight: bolder;">◎审核中</label></s:if>
						<s:if test="#list.checkStuWorkState==1"><label style="color: green;font-size: 12px;font-weight: bolder;">√审核通过</label></s:if>
						<s:if test="#list.checkStuWorkState==2"><label style="color:red ;font-size: 12px;font-weight: bolder;">×审核失败</label></s:if>
						</s:if>
						</td>
						
						<td><s:property value="#list.startTime" />
						-<s:property value="#list.endTime" /></td>
						<td>
							 <s:if test="#session.role==1">
						<input type="button"
							onclick="location.href='<%=path %>/admin/vacate_queryById.action?vacate.id=${list.id }'"
							class="ext_btn ext_btn_success" value="修改"> <input
							type="button"
							onclick="location.href='<%=path %>/admin/vacate_delete.action?vacate.id=${list.id }'"
							class="ext_btn ext_btn_error" value="撤销申请">
							</s:if><s:else>
						<input type="button"
							onclick="location.href='<%=path %>/admin/vacate_queryById.action?vacate.id=${list.id }'"
							class="ext_btn ext_btn_success" style="width: 100%;height: 80px;font-size: 18px;" value="审核"> 
						 </s:else>
					</tr>
				</s:iterator>

			</table>
			<div class="page mt10">
				<div class="pagination">
					<ul>
						<li class="first-child"><a
							href="<%=path %>/admin/vacate_queryList.action?pageList.pageNo=1">首页</a></li>
						<li <s:if test="pageList.pageNo==1">class="disabled"</s:if>>
							<a
							href="<%=path %>/admin/vacate_queryList.action?pageList.pageNo=
                      <s:if test="pageList.pageNo==1">${pageList.pageNo}</s:if>
                          <s:else>${pageList.pageCount-1}</s:else>">上一页</a>
						</li>

						<li><a>${pageList.pageNo}/${pageList.pageCount}</a></li>
						<li
							<s:if test="pageList.pageCount==pageList.pageNo">class="disabled"</s:if>>
							<a
							href="<%=path %>/admin/vacate_queryList.action?pageList.pageNo=
                       <s:if test="pageList.pageCount==pageList.pageNo">${pageList.pageCount}</s:if>
                          <s:else>${pageList.pageCount+1}</s:else>">下一页</a>
						</li>
						<li class="last-child"><a
							href="<%=path %>/admin/vacate_queryList.action?pageList.pageNo=${pageList.pageCount}">末页</a></li>
					</ul>
				</div>

			</div>
		</div>
	</div>
	<script type="text/javascript">
     $(function(){
    	 $("#select").change(function(){
    		 $("#selectInput").attr("name",jQuery("#select  option:selected").val());
    	 });
     });
     </script>


</body>
</html>
